import { roleType } from "@/store/useRole";

export enum RouterEnum {
  Login = "/login",
  Home = "/home",
  LabQeury = "/labquery",
  LabqueryTeacher = "/labqueryTeacher",
  RepairLog = "/repairlog",
  LabApply = "/labapply",
  StudentLabApply = "/student-lab-apply",
  StudentLabQuery = "/labquery",
  TeacherLabQuery = "/labqueryTeacher",
  TeacherLabApply = "/teacher-lab-apply",
  TeacherLabApplyList = "/teacher-lab-apply/applylist",
  TeacherLabApplyArrange = "/teacher-lab-apply/arrangeclass",
  ArrangeClass = "/arrangeclass",
  SemesterManage = "/semester-manage",
  UserManage = "/user-manage",
  UserCreate = "/user-manage/create",
  UserManageList = "/user-manage/list",
  LabManage = "/lab-manage",
  LabManageCreate = "/lab-manage/create",
  LabManageList = "/lab-manage/list",
  LabTypeManage = "/lab-type-manage",
  LabTypeManageList = "/lab-type-manage/list",
}
export const rolePermissions = {
  [roleType.Administrator]: [
    RouterEnum.Home,
    RouterEnum.UserManage,
    RouterEnum.UserCreate,
    RouterEnum.UserManageList,
    RouterEnum.TeacherLabApplyList,
    RouterEnum.TeacherLabApply,
    RouterEnum.LabManage,
    RouterEnum.LabManageList,
    RouterEnum.LabManageCreate,
    RouterEnum.LabTypeManageList,
    RouterEnum.StudentLabApply,
    RouterEnum.LabTypeManage,
    RouterEnum.TeacherLabApplyArrange,
    RouterEnum.SemesterManage,
  ],
  [roleType.Experimenter]: [RouterEnum.Home, RouterEnum.RepairLog],
  [roleType.Teacher]: [
    RouterEnum.Home,
    RouterEnum.TeacherLabApplyList,
    RouterEnum.TeacherLabQuery,
    RouterEnum.LabManage,
    RouterEnum.LabManageList,
  ], // 排课申请是那个
  [roleType.Student]: [
    RouterEnum.Home,
    RouterEnum.StudentLabQuery,
    RouterEnum.LabApply,
  ], // 个人借用情况
  [roleType.NotLogin]: [RouterEnum.Home, RouterEnum.Login],
};
